package com.tchintech.pay.delegate;

import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.tchintech.pay.R;
import com.tchintech.pay.frame.view.AppDelegate;

import butterknife.Bind;

/**
 * Created by Administrator on 2017/7/6 0006.
 */

public class RegisterActivityDelegate extends AppDelegate {
    @Bind(R.id.register_tv_tips)
    TextView registerTvTips;
    @Bind(R.id.register_ed_phoneNumber)
    EditText registerEdPhoneNumber;
    @Bind(R.id.register_ed_password)
    EditText registerEdPassword;
    @Bind(R.id.register_ed_verify_code)
    EditText registerEdVerifyCode;
    @Bind(R.id.register_ed_recommend)
    EditText register_ed_recommend;
    @Bind(R.id.register_bt_send_verify_code)
    TextView registerBtSendVerifyCode;
    @Bind(R.id.tv_title)
    TextView tv_title;
    @Bind(R.id.register_rel)
    RelativeLayout register_rel;
    @Bind(R.id.register_bt_register)
    Button registerBtRegister;
    @Bind(R.id.iv_back)
    ImageView imageView;


    @Override
    public int getRootLayoutId() {
        return R.layout.activity_register;
    }

    public String getText(int id) {
        String text = "";
        try {
            EditText et = get(id);
            text = et.getText().toString().trim();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return text;
    }

    public RelativeLayout getRegister_rel(){
        return register_rel;
    }
    public void setVisible() {
        imageView.setVisibility(View.VISIBLE);
    }

    public void setTitle(String str){
        tv_title.setText(str);
    }

    //获取文本框输入内容
    public String getEditString(int id) {
        String str = "";
        try {
            EditText text = get(id);
            str = text.getText().toString().trim();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return str;
    }


    public TextView getTextView(int id) {
        TextView text = null;
        try {
            text = get(id);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return text;
    }

    ;


}
